﻿using OpenApi;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.ServiceModel.Web;
using System.ServiceProcess;

namespace OpenApiHostService
{
	partial class MyService : ServiceBase
	{
		public MyService()
		{
			InitializeComponent();
		}

		/// <summary>
		/// 启动。
		/// </summary>
		public void Start()
		{
			// 发布服务
			OpenApiPublisher.Publish();
		}

		protected override void OnStart(string[] args)
		{
			Start();
		}

		protected override void OnStop()
		{
			Stop();
		}
	}
}
